<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="<%=basePath%>">

<title>My JSP 'index_top.jsp' starting page</title>

<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">
<link rel="stylesheet" href="css/StyleSheet.css" type="text/css" />
<script src="jquery/jquery-3.1.1.js"></script>
</head>

<body>
	<div id="divTop" class="divTopHead"></div>
	<div id="divHead" class="hss">
		<div class="blogTitle">2017，我的一年</div>
		<div class="subTitle">快乐技术，快乐生活</div>
	</div>
	<script type="text/javascript">
		window.onload = function() {
			InitBlogsInfo();
		};
		/* 初始化博客信息  */
		function InitBlogsInfo() {
			$.ajax({
				type : "POST",
				url : "blogIndex!BlogsInfo",
				success : function(msg) {
					var json = eval("(" + msg + ")");
					$('.blogTitle').html(json[0].title);
					$('.subTitle').html(json[0].description);
				},
				error : function(r, r2, err) {
					alert("连接错误:" + err.message);
				}
			});
		}
	</script>
</body>
</html>
